package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeWarningMapper;
import com.ruoyi.grape.domain.GrapeWarning;
import com.ruoyi.grape.service.IGrapeWarningService;

/**
 * 预警历史信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeWarningServiceImpl implements IGrapeWarningService 
{
    @Autowired
    private GrapeWarningMapper grapeWarningMapper;

    /**
     * 查询预警历史信息
     * 
     * @param warningId 预警历史信息主键
     * @return 预警历史信息
     */
    @Override
    public GrapeWarning selectGrapeWarningByWarningId(Long warningId)
    {
        return grapeWarningMapper.selectGrapeWarningByWarningId(warningId);
    }

    /**
     * 查询预警历史信息列表
     * 
     * @param grapeWarning 预警历史信息
     * @return 预警历史信息
     */
    @Override
    public List<GrapeWarning> selectGrapeWarningList(GrapeWarning grapeWarning)
    {
        return grapeWarningMapper.selectGrapeWarningList(grapeWarning);
    }

    /**
     * 新增预警历史信息
     * 
     * @param grapeWarning 预警历史信息
     * @return 结果
     */
    @Override
    public int insertGrapeWarning(GrapeWarning grapeWarning)
    {
        return grapeWarningMapper.insertGrapeWarning(grapeWarning);
    }

    /**
     * 修改预警历史信息
     * 
     * @param grapeWarning 预警历史信息
     * @return 结果
     */
    @Override
    public int updateGrapeWarning(GrapeWarning grapeWarning)
    {
        return grapeWarningMapper.updateGrapeWarning(grapeWarning);
    }

    /**
     * 批量删除预警历史信息
     * 
     * @param warningIds 需要删除的预警历史信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapeWarningByWarningIds(Long[] warningIds)
    {
        return grapeWarningMapper.deleteGrapeWarningByWarningIds(warningIds);
    }

    /**
     * 删除预警历史信息信息
     * 
     * @param warningId 预警历史信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapeWarningByWarningId(Long warningId)
    {
        return grapeWarningMapper.deleteGrapeWarningByWarningId(warningId);
    }
}
